<div ng-controller="z-businessTripLook-c" z-loading is-loading="viewModel.isLoading">
	<div viewstack class="carousel slide" data-ride="carousel">
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<div class="row">
                    <div class="col-lg-12 heading">
                        <ul id="crumb" class="breadcrumb">
	                       <li>
		                        <i class="im-home"></i>
		                        <a href="index.html">首页</a>
	                        </li>
	                        <li ng-repeat="menu in viewModel.menuList">
	                        	<i class="{{menu.icons}}" ng-if="$index+1!=viewModel.menuList.length"></i>
	                        	<i class="en-arrow-right7" ng-if="$index+1==viewModel.menuList.length"></i>
	                        	{{menu.label}}
	                        </li>
                        </ul>
                    </div>
                </div>
                <div class="outlet">
	                <div class="panel-body">
	                    <form class="form-horizontal group-border hover-stripped" role="form" name="form">
	                        <div class="row">
	                           <div class="col-xs-12 col-sm-10 col-md-11 form-box">
	                             <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">审批状态：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : form.approvalState.$invalid && !form.approvalState.$pristine }">
												<select id="approvalState" class="form-control" ng-model="viewModel.approvalState">
	                                    <option value=""></option>
	                                    <option ng-repeat="dictionary in viewModel.approvalStateList" value="{{dictionary.dicCd}}" ng-selected="viewModel.approvalState==dictionary.dicCd">{{dictionary.dicName}}</option>
	                                            </select>
											</div>
										</div>
								 </div>
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">员工：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group">
												<textarea ng-model="viewModel.employeeNo" placeholder="员工号、中文名称、英文名称" class="form-control elastic __web-inspector-hide-shortcut__" rows="1" maxLength="255"></textarea>
											</div>
										</div>
									</div>
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">开始日期：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : form.retroactiveStratDate.$invalid && !form.retroactiveStratDate.$pristine }">
										<input name="retroactiveStratDate" 
											   ng-model="viewModel.retroactiveStratDate" 
											   class="form-control datetime-picker" 
											   type="text"
											   autofocus="autofocus" 
											   maxLength="10"
											   z-datepicker-popup="{{viewModel.format}}"
											   is-open="viewModel.startDateOpened"
											   datepicker-options="viewModel.dateOptions"
										       close-text="Close"
										       required
										       readonly>
										<span class="input-group-addon cursorPointer" ng-click="viewModel.startDateOpen($event)"><i class="fa-calendar"></i></span>
									</div>
										</div>
								 </div>
								 <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-2 col-md-2 form-title">至：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : form.retroactiveEndDate.$invalid && !form.retroactiveEndDate.$pristine }">
										           <input 
											   name="retroactiveEndDate" 
											   ng-model="viewModel.retroactiveEndDate" 
											   class="form-control datetime-picker" 
											   type="text"
											   autofocus="autofocus" 
											   maxLength="10"
											   z-datepicker-popup="{{viewModel.format}}"
											   is-open="viewModel.endDateOpened" 
											   datepicker-options="viewModel.dateOptions"
										       close-text="Close"
										       required
										       readonly>
										          <span class="input-group-addon cursorPointer" ng-click="viewModel.endDateOpen($event)"><i class="fa-calendar"></i></span>
									         </div>
										</div>
										<div class="col-xs-12 col-sm-2 col-md-1">
											<button type="button" class="btn btn-success" ng-click="viewModel.validForm(form.$valid)">搜索</button>
										</div>
								 </div>
	                            </div>
	                        </div>
	                    </form>
	                </div>
                </div>
				<div class="container-fluid">
					<div class="row">
						<table class="table table-striped table-bordered" cellspacing="0" width="100%">
							<thead>
								<tr>
									<th width="7%">员工号</th>
									<th width="7%">中文名称</th>
									<th width="7%">英文名称</th>
									<th>开始日期</th>
									<th>结束日期</th>
									<th>时长(天/小时)</th>
									<th width="6%">申请类型</th>
									<th width="6%">审核状态</th>
									<th width="13%">申请日期</th>
									<th width="20%">申请说明</th>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="requestLook in viewModel.dataList">
			                        <td>{{requestLook.employeeNo}}</td>
			                        <td>{{requestLook.chineseName}}</td>
			                        <td>{{requestLook.englishName}}</td>
			                        <td>
			                        	{{requestLook.startDate | date:'yyyy/MM/dd'}}<br>
			                        	{{requestLook.startTime}}
			                        </td>
			                        <td>
			                        	{{requestLook.endDate | date:'yyyy/MM/dd'}}<br>
			                        	{{requestLook.endTime}}
			                        </td>
			                        <td>
			                        	<span ng-if="requestLook.hours==null && requestLook.requestType!=12">
			                        				{{requestLook.dayNumber}}
			                        		天
			                        	</span>
			                        	<span ng-if="requestLook.requestType==12">
			                        		半天
			                        	</span>
			                        	<span ng-if="requestLook.hours!=null && requestLook.requestType!=12">
			                        				{{viewModel.toHourMinute(requestLook.hours)}}
			                        	</span>
			                        </td>
									<td>{{requestLook.requestTypeName}}</td>
									<td>{{requestLook.approvalStateName}}</td>
									<td>{{requestLook.requestDate | date:'yyyy/MM/dd HH:mm:ss'}}</td>
									<td>{{requestLook.description}}</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="row">
						<div z-Pagination total-Data='viewModel.totalData'
							per-Page='viewModel.perPage'
							current-Page='viewModel.rowCount'
							on-Click="viewModel.bindData()"
							on-Change-Per-Page="viewModel.bindData()"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>